import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [{
		path: '/',
		name: 'home',
		// component: HomeView,
		redirect: '/login',
	},
	{
		path: '/login',
		name: 'login',
		component: () => import('../views/LoginView.vue')
	},
	{
		path: '/first',
		component: () => import('../views/FirstView.vue'),
		children: [{
				path: 'search',
				name: 'search',
				component: () => import('../views/lookUP/SearchView.vue')
			},
			{
				path: 'rank',
				name: 'rank',
				component: () => import('../views/lookUP/RankView.vue')
			},
			{
				path: 'comparison',
				name: 'comparison',
				component: () => import('../views/lookUP/ComparisonView.vue')
			},
			{
				path: 'retrieval',
				name: 'retrieval',
				component: () => import('../views/Creative/RetrievalView.vue')
			},
			{
				path: 'simple',
				name: 'simple',
				component: () => import('../views/Creative/SimpleView.vue')
			},
			{
				path: 'antistop',
				name: 'antistop',
				component: () => import('../views/Creative/AntistopView.vue')
			},
			{
				path: 'intelbras',
				name: 'intelbras',
				component: () => import('../views/Creative/IntelbrasView.vue')
			},
			{
				path: 'topic',
				name: 'topic',
				component: () => import('../views/Creative/TopicView.vue')
			},
			{
				path: '/Topicdetail/:id',
				name: 'detail',
				component: () => import('../views/Creative/TopicDetail.vue'),
			},
			{
				path: 'retrieve',
				name: 'retrieve',
				component: () => import('../views/Analysis/RetrieveView.vue')
			},
			{
				path: 'ranks',
				name: 'ranks',
				component: () => import('../views/Analysis/RankingView.vue')
			},
			{
				path: 'admin',
				name: 'admin',
				component: () => import('../views/Analysis/AdminView.vue')
			},
			{
				path: 'favorite',
				name: 'favorite',
				component: () => import('../views/FavoriteView.vue')
			},
			{
				path: 'renewal',
				name: 'renewal',
				component: () => import('../views/RenewalView.vue')
			},
			{
				path: '/archel/:id',
				name: 'searchel',
				component: () => import('../views/Analysis/SearchsView.vue')
			},
			{
				path: '',
				name: "",
				redirect: '/first/search'
			},
		]
	},
	{
		path: '/about',
		name: 'about',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import( /* webpackChunkName: "about" */ '../views/AboutView.vue')
	}
]

const router = new VueRouter({
	routes
})

export default router
